Skip to content

Add coreml quant recipes #13265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: gh/abhinaykukkadapu/4/head
Choose a base branch
from

Conversation

abhinaykukkadapu
Copy link
Contributor

@abhinaykukkadapu abhinaykukkadapu commented Aug 10, 2025

Adds coreml quant recipes after FP32/16 recipes added in #13121

Recipes added:

  1. PT2E_INT8_STATIC
  2. PT2E_INT8_WEIGHT_ONLY
  3. INT4_WEIGHT_ONLY_PER_CHANNEL
  4. INT4_WEIGHT_ONLY_PER_GROUP
  5. INT8_WEIGHT_ONLY_PER_CHANNEL
  6. INT8_WEIGHT_ONLY_PER_GROUP
  7. CODEBOOK_WEIGHT_ONLY

[ghstack-poisoned]
@abhinaykukkadapu
Copy link
Contributor Author

abhinaykukkadapu commented Aug 10, 2025

Copy link

pytorch-bot bot commented Aug 10, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/13265

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Cancelled Job, 1 Unrelated Failure

As of commit e33390f with merge base a84b3c9 (image):

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 10, 2025
abhinaykukkadapu added a commit that referenced this pull request Aug 10, 2025
ghstack-source-id: 1bb73e0
ghstack-comment-id: 3172341606
Pull-Request: #13265
[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 10, 2025
ghstack-source-id: 76f6fc8
ghstack-comment-id: 3172341606
Pull-Request: #13265
@abhinaykukkadapu abhinaykukkadapu requested review from kimishpatel and metascroy and removed request for shoumikhin, cccclai and mcr229 August 10, 2025 03:52
abhinaykukkadapu added a commit that referenced this pull request Aug 10, 2025
ghstack-source-id: 76f6fc8
ghstack-comment-id: 3172341606
Pull-Request: #13265
[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 10, 2025
ghstack-source-id: d147f71
ghstack-comment-id: 3172341606
Pull-Request: #13265
[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 11, 2025
ghstack-source-id: cdcd86d
ghstack-comment-id: 3172341606
Pull-Request: #13265
)
elif recipe_type == CoreMLRecipeType.INT4_WEIGHT_ONLY_PER_GROUP:
group_size = kwargs.pop("group_size", 32)
return self._build_torchao_quantized_recipe(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the compute precision used in these quantization recipes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@metascroy It is FLOAT16, see _get_coreml_lowering_recipe function defaults.

[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 12, 2025
ghstack-source-id: c72ea76
ghstack-comment-id: 3172341606
Pull-Request: #13265
[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 12, 2025
ghstack-source-id: 622ea48
ghstack-comment-id: 3172341606
Pull-Request: #13265
[ghstack-poisoned]
abhinaykukkadapu added a commit that referenced this pull request Aug 12, 2025
ghstack-source-id: 3f0920d
ghstack-comment-id: 3172341606
Pull-Request: #13265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants